 <!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    

    <title>{$Think.config.site.title} - 配送管理</title>

    <meta name="keywords" content="{$Think.config.site.keywords}">

    <link href="{$Think.config.site.resource_url}css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/animate.min.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/style.min.css?v=4.0.0" rel="stylesheet">

</head>
<style>
#listtable .fa{
	cursor:pointer;
	color:#1ab394;
	margin-right:1em;
}
th .tag{font-size: 12px; color: #e66c6c; font-weight: normal;}
.ibox-title .tag{font-size: 12px; color: #e66c6c; font-weight: normal; display: inline-block; margin-left: 20px;}
.specval-hide{display: none;}

.btn-group{ font-size:0}
.btn-group .btn{ margin-left:-1px}
.btn-group .btn:not(:first-child):not(:last-child):not(.dropdown-toggle){ border-radius:0}
.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius: 0;border-top-right-radius: 0}
.btn-group > .btn:last-child:not(:first-child),.btn-group > .dropdown-toggle:not(:first-child) {border-bottom-left-radius: 0;border-top-left-radius: 0}
.refund{width:21%;float: left;margin-right:10px;line-height: 34px;font-size: 1.5rem}
.good_num{width:63%;float: left;}
.submit{margin:15px auto 0;width:20%;}
.select_refund{width:29px;float: left;padding: 0px;font-size: 25px;text-align:center;line-height: 34px;margin-bottom: 0px;}
.select_refund_input{width:63%;}
.select_refund_ul{width: 75%;position: absolute;top:34px;left:21%;padding:0px;list-style: none;margin-left:10px;display: none; }
.select_refund_ul li{height:30px;line-height: 30px;border: 1px solid #ccc;text-indent: 5px;background: white;}
.num{line-height: 34px;font-size: 22px;text-indent:2px;display: inline-block;}
</style>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
          <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-content">
						<form id="myForm">
							<!-- <table class="table table-striped">
								<thead>
									<tr>
										<th>商品图片</th>
										<th>商品名</th>
										<th>规格名</th>
										<th>商品价格</th>
										<th>退货数量</th>
									</tr>
								</thead>	
								<tbody>
									<tr>
										<td><img src="{$goods_picture}" width="30" height="30"/></td>
										<td>{$goods_name}</td>
										<td>{$goods_specval_name}</td>
										<td>{$price}</td>
										<td width="60">
											<div class="input-group">
												<input type="number" class="form-control good_num" name="nums" min='0' max="{$num}" value="">
											</div>
										</td>
									</tr>
								</tbody>
							</table> -->
							<p>{if condition="$brand_name neq ''"}（{$brand_name}）{/if}{$goods_name}&nbsp;&nbsp;[&nbsp;1*{$goods_spec_name}&nbsp;({$goods_specval_name})&nbsp;]</p>
							<div>
								<span class='refund'>退货数量</span>
								<input type="number" class="good_num form-control" name="nums" min='0' max="{$num}" value=""><span class='num'>/{$num}</span>
								<div style="clear:both"></div>
							</div>
							<div style='margin-top: 5px;position: relative;'>
								<span class='refund'>退货原因</span>
								<input type="text" class="good_num form-control select_refund_input" name="remarks">
								<p class="form-control select_refund">▼</p>
								<ul class="select_refund_ul">
									<li>1、<span>质量原因</span></li>
									<li>2、<span>价格原因</span></li>
									<li>3、<span>货品不符</span></li>
								</ul>
								<div style="clear:both"></div>
							</div>
							<input type="hidden" name="order_id" value="{$order_id}" />
							<input type="hidden" name="order_goods_id" value="{$order_goods_id}" />
							<div class='submit'><input type="submit" class="btn btn-primary" value="确定" /></div>
						</form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="{$Think.config.site.resource_url}js/jquery.min.js?v=2.1.4"></script>
    <script src="{$Think.config.site.resource_url}js/bootstrap.min.js?v=3.3.5"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/peity/jquery.peity.min.js"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/iCheck/icheck.min.js"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/layer/layer.js"></script>
    <script src="{$Think.config.site.common_resource_url}js/majax.js"></script>
    <script src="{$Think.config.site.common_resource_url}js/jedit.js"></script>
    <script src="{$Think.config.site.common_resource_url}js/jquery.jeditable.js"></script>
</body>

</html>
<script>
$(document).ready(function() {
	$('#myForm').on('submit',function(){
		majax('{:url("refund")}',$(this).serialize(),function(d){
			if (d.code>0) {
				window.parent.editSuccess(d);
			}else{
				layer.msg(d.msg, {icon: 5});
			}
		});
		return false;
	});	
	
	$('.select_refund').click(function(){
		$('.select_refund_ul').fadeToggle('fast');
	})
	$('.select_refund_ul li').click(function(){
		var question = $(this).children().text();
		$('.select_refund_input').val(question);
		$('.select_refund_ul').hide();
	})
});	
</script>